<?php

defined( 'PDNS_AUTH' ) or die( "Unauthorized" );

?>

<html>
<head>
	<title>pdnsFront</title>
	<link href="templates/default.css" rel="stylesheet" type="text/css" />
	<link href="templates/default.print.css" rel="stylesheet" type="text/css" media="print" />
</head>
<body>

<div id='header'>
<h1>pdnsFront</h1>
<?php require_once('menu.php'); ?>
</div>

<?php echo Output::getOutput( 'messages' ); ?>

<?php echo Output::getOutput( 'h2' ); ?>

<?php if( Actions::countActions() ):?>
	<div class='menubar'>
	<?php echo Output::getOutput( 'actions' ); ?>
	</div>
<?php endif; ?>

<?php echo Output::getOutput( 'option' ); ?>

<hr />
<p class='smallprint'>PowerDNS management from <a href='http://code.google.com/p/pdnsfront/'>pdnsFront</a>.  All changes take <b>immediate</b> effect.</p>

<?php if( Config::get('debug') ): ?><div class='debug'>

	<p>
		Application Execution Time: <?php echo microtime() - PDNS_START_TIME; ?> seconds
	</p>

	<p>
		MySQL Query Log: <?php if( ! count(DB::getQueryLog()) ): ?>No queries.<?php endif; ?>
		<ol>
		<?php foreach( DB::getQueryLog() as $log ): ?>
			<li>
				<?php echo $log; ?>
			</li>
		<?php endforeach; ?>
		</ol>
	</p>

</div><?php endif; ?>

</body>
</html>
